package com.cgnpc.scp.achievement.service;

import com.cgnpc.cud.core.domain.AjaxResult;
import com.cgnpc.scp.achievement.mybatis.entity.Subject;
import com.cgnpc.scp.achievement.pojo.SaveSubjectReq;
import com.cgnpc.scp.achievement.pojo.SubjectDetail;
import com.cgnpc.scp.common.bean.CreateFileInfo;
import com.cgnpc.scp.common.bean.MyPageResult;
import com.cgnpc.scp.common.pojo.UserInfo;
import com.cgnpc.scp.purchase.mybatis.entity.PurchaseProject;
import org.springframework.web.multipart.MultipartFile;

import java.io.File;
import java.util.List;
import java.util.Locale;

public interface SubjectService
{
    public Subject saveSubject(SaveSubjectReq saveReq);

    public MyPageResult<Subject> querySubjectPageList(Subject subject);

    public SubjectDetail querySubjectDetailById(String id);

    boolean delByIds(List<String> ids);

    boolean isAllowDownload(String id);

    File genDownLoadFiles(String id);

    <T extends Subject> CreateFileInfo exportExcel(T reqEntity) throws Exception;

    <T extends Subject> AjaxResult importFromExcel(UserInfo loginUserInfo, Locale reqLocale, MultipartFile reqFile) throws Exception;

    <T extends Subject> AjaxResult saveOrUpdate(UserInfo loginUserInfo, Locale reqLocale, List<T> reqEntityList);
}
